const Constant = {
  //插件
  PLUGIN: ["geocoder", "homeButton", "sceneModePicker", "baseLayerPicker", "navigationHelpButton", "animation", "timeline", "fullscreenButton", "vrButton", "infoBox", "selectionIndicator"], //地形
  //图层
  BASELAYER: {
    //ArcGIS卫星图
    ARCGISIMAGERY1: function () {
      return new Cesium.ArcGisMapServerImageryProvider({
        url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
      })
    },
    //ArcGIS蓝色图
    ARCGISIMAGERY2: function () {
      return new Cesium.UrlTemplateImageryProvider({
        url: "https://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
      })
    },
    //Bing Maps Aerial with Labels
    ICONIMAGERY1: function () {
      return new Cesium.IonImageryProvider({
        assetId: 3
      })
    },
    //影像注记
    TIANDITUIMAGERY1: function () {
      return new Cesium.WebMapTileServiceImageryProvider({
        url: "http://{s}.tianditu.gov.cn/img_c/wmts?service=wmts&request=GetTile&version=1.0.0" +
          "&LAYER=img&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}" +
          "&style=default&format=tiles&tk=c3590e0369a5a624bddb16e316b4f2d5",
        layer: "tdtImg_c",
        style: "default",
        format: "tiles",
        tileMatrixSetID: "c",
        subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
        tilingScheme: new Cesium.GeographicTilingScheme(),
        tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"],
        maximumLevel: 50,
        show: false
      })
    },
    //影像注记
    TIANDITUIMAGERY2: function () {
      return new Cesium.WebMapTileServiceImageryProvider({
        url: "http://{s}.tianditu.gov.cn/cia_c/wmts?service=wmts&request=GetTile&version=1.0.0" +
          "&LAYER=cia&tileMatrixSet=c&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}" +
          "&style=default&format=tiles&tk=c3590e0369a5a624bddb16e316b4f2d5",
        layer: "tdtImg_c",
        style: "default",
        format: "tiles",
        tileMatrixSetID: "c",
        subdomains: ["t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"],
        tilingScheme: new Cesium.GeographicTilingScheme(),
        tileMatrixLabels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"],
        maximumLevel: 50,
        show: false
      })
    },
    //影像注记
    TIANDITUIMAGERY3: function () {
      return new Cesium.WebMapTileServiceImageryProvider({
        url: "http://t0.tianditu.gov.cn/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=c3590e0369a5a624bddb16e316b4f2d5",
        layer: "tdtCiaLayer",
        style: "default",
        format: "image/jpeg",
        tileMatrixSetID: "GoogleMapsCompatible",
      })
    },
    GAODE1: function () {
      return new Cesium.UrlTemplateImageryProvider({
        url: "http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
        minimumLevel: 3,
        maximumLevel: 18
      })
    },
    GAODE2: function () {
      return new Cesium.UrlTemplateImageryProvider({
        url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
        minimumLevel: 3,
        maximumLevel: 18
      })
    },
    GAODE3: function () {
      return new Cesium.UrlTemplateImageryProvider({
        url: "http://webst02.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8",
        minimumLevel: 3,
        maximumLevel: 18
      })
    }
  },
  //地形
  TERRAIN: {
    Ellipsoid: function () {
      sessionStorage.setItem('isTerrain', false);
      return new Cesium.EllipsoidTerrainProvider({})
    },
    WorldTerrain: function () {
      sessionStorage.setItem('isTerrain', true);
      return new Cesium.createWorldTerrainAsync({
        requestWaterMask: true,
        requestVertexNormals: true
      });
    },
  },
  //绘制
  PAINT: [{
    text: '添加标记',
    type: 'marker',
    children: [{
      text: '标记点',
      type: 'point'
    }, {
      text: '画线',
      type: 'polyline'
    }, {
      text: '画面',
      type: 'polygon'
    }, {
      text: '画圆',
      type: 'circle'
    }, {
      text: '画矩形',
      type: 'rectangle'
    }, {
      text: '清空标记',
      type: 'clearMarks'
    }, ]
  }],
  //右键菜单
  RIGHTMENU: [{
    text: '显示此处坐标',
    type: 'longlat'
  }, {
    text: '查看当前视角',
    type: 'currentView'
  }, {
    text: '地形服务',
    type: 'landform',
    children: [{
      text: '开启地形',
      type: 'openLandform'
    }, {
      text: '关闭地形',
      type: 'closeLandform'
    }, ]
  }, {
    text: '视角切换',
    type: 'visual',
    children: [{
      text: '环绕飞行',
      type: 'surround'
    }, {
      text: '取消环绕飞行',
      type: 'closeSurround'
    }, {
      text: '移动到此处',
      type: 'move'
    }, {
      text: '第一视角',
      type: 'firstView'
    }, ]
  }, {
    text: '测量工具',
    type: 'measure',
    children: [{
      text: '距离',
      type: 'distance'
    }, {
      text: '面积',
      type: 'square'
    }, {
      text: '高度差',
      type: 'height'
    }, {
      text: '角度',
      type: 'angle'
    }, {
      text: '删除测量',
      type: 'clearMeasure'
    }, ]
  }, {
    text: '添加标记',
    type: 'marker',
    children: [{
      text: '标记点',
      type: 'point'
    }, {
      text: '画线',
      type: 'polyline'
    }, {
      text: '画面',
      type: 'polygon'
    }, {
      text: '画圆',
      type: 'circle'
    }, {
      text: '画矩形',
      type: 'rectangle'
    }, {
      text: '清空标记',
      type: 'clearMarks'
    }, ]
  }, {
    text: '场景设置',
    type: 'resetPerspective',
    children: [{
      text: '开启深度监测',
      type: 'openDepth'
    }, {
      text: '关闭深度监测',
      type: 'closeDepth'
    }, {
      text: '开启下雨',
      type: 'openRain'
    }, {
      text: '关闭下雨',
      type: 'closeRain'
    }, {
      text: '开启下雪',
      type: 'openSnow'
    }, {
      text: '关闭下雪',
      type: 'closeSnow'
    }, {
      text: '开启雾霾',
      type: 'openFog'
    }, {
      text: '关闭雾霾',
      type: 'closeFog'
    }]
  }]
}

export default Constant;